package com.hengpeng.itfinbase.persist;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Enumerated;

import com.hengpeng.common.web.annotation.HtmlInput;
import com.hengpeng.common.web.annotation.HtmlInputPattern;
import com.hengpeng.common.web.annotation.HtmlInputType;
import com.hengpeng.itfinbase.idAssign.AbstractAssign18IdEntity;

/**
 * <pre>
 * 用户银行卡信息
 * </pre>
 * @author shanguogang
 * @version 1.0, 2015-8-6
 */
@Entity
public class UserBankCard  extends AbstractAssign18IdEntity
{
	public static enum BankType
	{
		ABC("abc", "中国农业银行"), BCM("bcm", "交通银行"), BEA("bea", "东亚银行"), BOB("bjrcb", "北京银行"), BOC("boc", "中国银行"), CBB("cbb",
		"渤海银行"), CCB("ccb", "中国建设银行"), CCITICB(
				"cciticb", "中信银行"), CEB("ceb", "中国光大银行"), CIB("cib", "兴业银行"), CMB(
						"cmb", "招商银行"), CMBC("cmbc", "中国民生银行"), CZB("czb", "浙商银行"), GDB("gdb", "广东发展银行"), GZCB("gzcb", "广州银行"), GZRCC("gdrcc", "广州市农村信用合作社"), HSB("hsb",
				"徽商银行"), HXB("hxb",
				"华夏银行"), HZB("hzb", "杭州银行"), ICBC("icbc", "中国工商银行"), NBCB("nbcb", "宁波银行"), NJCB("njcb", "南京银行"), PAB("pab", "平安银行"), PSBC("psbc", "中国邮政储蓄银行"), 
				SDB("sdb", "深圳发展银行"), SHB("shb", "上海银行"), SPDB("spdb", "上海浦东发展银行"), SRCB("srcb", "上海农村商业银行");

		private String text;

		private String value;

		BankType(String value, String text)
		{
			this.value = value;
			this.text = text;
		}

		public String getText()
		{
			return text;
		}

		public String getValue()
		{
			return value;
		}

		public void setText(String text)
		{
			this.text = text;
		}

		public void setValue(String value)
		{
			this.text = value;
		}
	}

	private static final long serialVersionUID = 5517523391936066832L;
	
	@HtmlInput(label = "银行卡号", type = HtmlInputType.TEXT, index = 5, nullable = false)
	@Column(length = 50)
	private String bankCardNo;

	@HtmlInput(label = "银行名称", type = HtmlInputType.TEXT, index = 6, nullable = false)
	@Enumerated(javax.persistence.EnumType.STRING)
	@Column(length = 50)
	private BankType bankName;

	@HtmlInput(label = "用户名", type = HtmlInputType.TEXT, index = 2, nullable = false)
	@Column(length = 50)
	private String userName;

	@HtmlInput(label = "分行名称", type = HtmlInputType.TEXT, index = 9, nullable = true)
	@Column(length = 50)
	private String branch;

	@HtmlInput(label = "银行城市", type = HtmlInputType.TEXT, index = 8, nullable = true)
	@Column(length = 50)
	private String city;

	/**
	 * 是否绑定
	 */
	@Enumerated(javax.persistence.EnumType.STRING)
	private BoolValue isPriority;

	@HtmlInput(label = "服务商", type = HtmlInputType.TEXT, index = 3, nullable = false)
	@Column(length = 10)
	private String providerId;

	@HtmlInput(label = "银行省份", type = HtmlInputType.TEXT, index = 7, nullable = true)
	@Column(length = 50)
	private String province;

	@HtmlInput(label = "真实姓名", type = HtmlInputType.TEXT, index = 4, nullable = false)
	@Column(length = 50)
	private String realName;


	@HtmlInput(label = "支行名称", type = HtmlInputType.TEXT, index = 10, nullable = true)
	@Column(length = 50)
	private String subbranch;

	/**
	 * 手机号码
	 */
	@Column(length = 20)
	@HtmlInput(label = "手机号码", type = HtmlInputType.TEXT, nullable = false, index = 2)
	private String mobile;
	
	/**
	 * 创建时间
	 */
	@HtmlInput(label = "创建时间", type = HtmlInputType.TEXT, pattern = HtmlInputPattern.DATETIME, format = "yyyy-MM-dd HH:mm", nullable = true, index = 15)
	private Date createTime;
	
	public Date getCreateTime()
	{
		return createTime;
	}

	public void setCreateTime(Date createTime)
	{
		this.createTime = createTime;
	}

	public BankType getBankName()
	{
		return this.bankName;
	}

	public String getBranch()
	{
		return this.branch;
	}

	public String getCity()
	{
		return this.city;
	}

	public BoolValue getIsPriority()
	{
		return isPriority;
	}

	public String getProviderId()
	{
		return this.providerId;
	}

	public String getProvince()
	{
		return this.province;
	}

	public String getRealName()
	{
		return this.realName;
	}


	public String getSubbranch()
	{
		return this.subbranch;
	}

	public String getBankCardNo()
	{
		return bankCardNo;
	}

	public void setBankCardNo(String bankCardNo)
	{
		this.bankCardNo = bankCardNo;
	}

	public void setBankName(BankType bankName)
	{
		this.bankName = bankName;
	}

	public void setBranch(String branch)
	{
		this.branch = branch;
	}

	public void setCity(String city)
	{
		this.city = city;
	}

	public void setIsPriority(BoolValue isPriority)
	{
		this.isPriority = isPriority;
	}

	public void setProviderId(String providerId)
	{
		this.providerId = providerId;
	}

	public void setProvince(String province)
	{
		this.province = province;
	}

	public void setRealName(String realName)
	{
		this.realName = realName;
	}

	public void setSubbranch(String subbranch)
	{
		this.subbranch = subbranch;
	}

	public String getUserName()
	{
		return userName;
	}

	public void setUserName(String userName)
	{
		this.userName = userName;
	}

	public String getMobile()
	{
		return mobile;
	}

	public void setMobile(String mobile)
	{
		this.mobile = mobile;
	}
	
}